#include "TrueText/Config.h"
#include "FontEffectShadowImpl.h"
#include "ShadowDrawer.h"

namespace TrueText {

FontEffectShadowImpl::FontEffectShadowImpl()
{
}

FontEffectShadowImpl::FontEffectShadowImpl(const FontEffectShadowImpl& rhs)
	: enabled(rhs.enabled)
	, shadowInfo(rhs.shadowInfo)
{ }

const FontEffectShadowImpl& FontEffectShadowImpl::operator=(const FontEffectShadowImpl& rhs)
{
	if (&rhs == this)
		return *this;

	enabled = rhs.enabled;
	shadowInfo = rhs.shadowInfo;

	return *this;
}

FontEffectShadowImpl::~FontEffectShadowImpl()
{
}

const ShadowInfo& FontEffectShadowImpl::GetShadowInfo() const
{
	return shadowInfo;
}

void FontEffectShadowImpl::SetShadowInfo(const ShadowInfo& value)
{
	shadowInfo = value;
}

bool FontEffectShadowImpl::IsEnabled() const
{
	return enabled;
}

void FontEffectShadowImpl::Enable(bool fEnable)
{
	enabled = fEnable;
}

boost::shared_ptr<Drawer> FontEffectShadowImpl::CreateDrawer(Drawer* sourceDrawer) const
{
	return boost::shared_ptr<Drawer>(new ShadowDrawer(sourceDrawer, shadowInfo));
}

}